package com.flower.tokenCenter.task;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

import com.flower.tokenCenter.service.TokenService;

/**  

* <p>Title: TokenTask</p>  

* <p>Description:token 任务 </p>  

* @author QingFeng  

* @date 2020年5月14日  

*/
@Configuration     
@EnableScheduling 
public class TokenTask {
	
	  @Autowired
	  private TokenService tokenService;
	
	  @Scheduled(fixedDelay = 1000*60*30* 1) 
	  public void syncToken() {
		  tokenService.syncOfficialToken();
	  }

}
